Author Topic: Dev C++ to Code::Blocks - project wont link...[SOLVED]  (Read 4316 times)

Offline JeZLee

  • Single posting newcomer
  • *
  • Posts: 3
Dev C++ to Code::Blocks - project wont link...[SOLVED]
« on: December 10, 2008, 02:14:35 pm »
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
« Last Edit: December 10, 2008, 08:09:50 pm by JeZLee »

Online stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: Dev C++ to Code::Blocks - project wont link...
« Reply #1 on: December 10, 2008, 07:43:09 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++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline JeZLee

  • Single posting newcomer
  • *
  • Posts: 3
Re: Dev C++ to Code::Blocks - project wont link...
« Reply #2 on: December 10, 2008, 08:08:58 pm »
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