Code::Blocks Forums

User forums => Help => Topic started by: mike on March 23, 2005, 10:28:52 pm

Title: Compile problems using Beta 6
Post by: mike on March 23, 2005, 10:28:52 pm
Full of excitement, I installed Beta 6 on top of Beta 5. But then the problems came...
The set up: I have a two-project solution, where one produces a library, which the other one (being an EXE) uses. Both projects have MinGW and MSVC targets.

When Linking the "main" MinGW project, I see the followoing messages.

1)
Warning: .drectve `/DEFAULTLIB:"LIBCD" /DEFAULTLIB:"OLDNAMES" ' unrecognized

I guess, the linker options are mixed with those from MSVC.

2)
Linking console executable: main-mingw.exe
library.lib(.msvc-objs/../src/file.o)...: variable '_iob' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.

Linking with the wrong library (I reserved LIB extension for MSVC and A for MinGW).

Help is needed urgently, before I switched back to Beta 5 :-)
Title: Compile problems using Beta 6
Post by: mandrav on March 25, 2005, 09:45:16 am
Some of the compiler configuration has changed since beta5. Before we go any further with this, just to make sure that this is not the root of the problem, clear the configuration. To do this, launch codeblocks.exe once with the command line argument "--clear-configuration". This will clear *everything* like it was just installed.

After you do this, does the problem persist?

Yiannis.
Title: Compile problems using Beta 6
Post by: mike on March 26, 2005, 09:48:36 pm
Yes, I still have this problem.
Title: Compile problems using Beta 6
Post by: mike on March 26, 2005, 09:51:28 pm
Moreover, I noticed the the library project does not produce the file "mylib.a" (MinGW target, the file name is specified as the output file), but "libmylib.a" instead:

Code

Linking static library: ..\..\Libs\mylib.a
ar.exe: creating ..\..\Libs\libmylib.a
ranlib: '..\..\Libs\mylib.a': No such file
Title: Compile problems using Beta 6
Post by: Anonymous on March 27, 2005, 10:45:17 pm
I'd like to add that manual inspection of the project file (in a text editor) showed no apparent errors in it - the targets are defined correctly (with regards to compiler options and linked libraries), and the needed C files belong to those targets.
Title: Compile problems using Beta 6
Post by: mandrav on March 28, 2005, 09:55:03 am
Do you think you could post/send the project file? I 'd like to take a peek...
Also, go to "Settings/Import-export configuration" and export just the "Compiler" settings (leave all others unchecked)...

Yiannis.
Title: Compile problems using Beta 6
Post by: mike on March 28, 2005, 04:50:15 pm
You'll get it tonight. Can I send it to you via email?
Title: Compile problems using Beta 6
Post by: mandrav on March 28, 2005, 06:55:52 pm
Sure, either email or PM me
Title: Compile problems using Beta 6
Post by: mike on March 28, 2005, 10:44:09 pm
Email is on its way...