News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Dev C++ to Code::Blocks - project wont link...[SOLVED]

Started by JeZLee, December 10, 2008, 02:14:35 PM

Previous topic - Next topic

JeZLee

Dev C++ to Code::Blocks - project wont link...

Hi,

I am switching from Dev C++ to Code::Blocks.
Dev C++ project successfully imported into Code::Blocks.
When I build project I get following linker error:

C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../crt2.o:crt1.c:(.text+0x167): undefined reference to `___cpu_features_init'

I think this is occurring because both Dev C++ and Code::Blocks install MinGW.
I have tried to fix this without success.
I do not want to uninstall Dev C++ because I have some old projects with that IDE.

If someone can help me fix this then please do...




JeZ+Lee
SLNTHERO@aol.com
www.SilentHeroProductions.com

stahta01

Quote from: JeZLee on December 10, 2008, 02:14:35 PM
I think this is occurring because both Dev C++ and Code::Blocks install MinGW.
I have tried to fix this without success.
I do not want to uninstall Dev C++ because I have some old projects with that IDE.

If someone can help me fix this then please do...

The rules I follow, to have multiple MinGW installs work.

1. DO NOT have any mingw installation on drive root like C:\MinGW
2. Do not have any of the mingw installations in the System environment Path variable
3. Copy the correct mingwm10.dll to project folders
4. Do not have Cygwin in the system environment path variable.

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

JeZLee

Hi,

I got it working on my own.

When I imported the Dev C++ project into Code::Blocks,
I forgot that it had its own Project Build Options.
Deleted the options pointing to the old Dev C++ MinGW
and everything is working now!

Just remember that Dev C++ project imported to Code::Blocks
has its own "Project Build Options" which may be pointing to the incorrect location of MinGW...


JeZ+Lee
SLNTHERO@aol.com
www.SilentHeroProductions.com