News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Can't compile my app anymore

Started by fusion, December 21, 2006, 08:08:41 PM

Previous topic - Next topic

fusion

Hi,

I have made a dll project in windows using mingw wich worked perfectly till now.
I don't know what I did or didn't do but I have a problem now. My dll project compiles fine but it doesn't seem
to generate the right information in the library files and in the export definition file.
There are alot of class methods missing. It worked very well till sometime yesterday.
In which menus should I look to repair my project?

Thanks,
fusion

Pecan

   //-- Please Provide more information
   Would you state your CodeBlocks version and compiler version and your Operating System.

Would you turn on compiler logging and paste the results in a msg.

   //-- Full Compile Logging --
   Main Menu->Settings->Compiler and Debugger->"Other"->Compiler logging = "Full command line".

fusion

Ah, sorry I always forget to post the essentials :(. I'm using MingW, the version is the one linked in the setup tutorial on the wiki.

Here's the compiler output:

Quote-------------- Build: Debug in SlickyEngine ---------------
mingw32-g++.exe -Wall  -Iinclude -IDependencies\physfs\include -IDependencies\Angelscript\include -Iinclude  -c src\Matrix4.cpp -o obj\Debug\src\Matrix4.o
mingw32-g++.exe -Wall  -Iinclude -IDependencies\physfs\include -IDependencies\Angelscript\include -Iinclude  -c src\Root.cpp -o obj\Debug\src\Root.o
mingw32-g++.exe -Wall  -Iinclude -IDependencies\physfs\include -IDependencies\Angelscript\include -Iinclude  -c src\ScriptManager.cpp -o obj\Debug\src\ScriptManager.o
mingw32-g++.exe -Wall  -Iinclude -IDependencies\physfs\include -IDependencies\Angelscript\include -Iinclude  -c src\Vector4.cpp -o obj\Debug\src\Vector4.o
mingw32-g++.exe -Wall  -Iinclude -IDependencies\physfs\include -IDependencies\Angelscript\include -Iinclude  -c src\FileSystem.cpp -o obj\Debug\src\FileSystem.o
mingw32-g++.exe -shared -Wl,--output-def=lib\Debug\libSlickyEngine_d.def -Wl,--out-implib=lib\Debug\libSlickyEngine_d.a -Wl,--dll -L"C:\Dokumente und Einstellungen\stefan\Desktop\cb\MinGW\lib"  obj\Debug\src\Matrix4.o obj\Debug\src\Root.o obj\Debug\src\ScriptManager.o obj\Debug\src\Vector4.o obj\Debug\src\FileSystem.o   -o lib\Debug\SlickyEngine_d.dll  Dependencies\physfs\physfs_static_debug\libphysfs_static.a Dependencies\Angelscript\lib\libangelscriptd.a
Creating library file: lib\Debug\libSlickyEngine_d.a

-------------- Build: Debug in SlickyTest ---------------
mingw32-g++.exe -Wall -g  -I..\SlickyEngine\Dependencies\physfs\include -I..\SlickyEngine\Dependencies\Angelscript\include -I..\SlickyEngine\include  -c main.cpp -o obj\Debug\main.o
mingw32-g++.exe -L"C:\Dokumente und Einstellungen\stefan\Desktop\cb\MinGW\lib"  -o .\SlickyTest.exe obj\Debug\main.o    ..\SlickyEngine\lib\Debug\libSlickyEngine_d.a ..\SlickyEngine\lib\Debug\libSlickyEngine_d.a
obj\Debug\main.o: In function `main':
D:/SlickyTest/main.cpp:12: undefined reference to `FileSystem::GetSingleton()'
D:/SlickyTest/main.cpp:13: undefined reference to `FileSystem::Init(char**)'
D:/SlickyTest/main.cpp:15: undefined reference to `FileSystem::GetBaseDir()'
D:/SlickyTest/main.cpp:16: undefined reference to `FileSystem::AddSearchPath(std::string, int)'
D:/SlickyTest/main.cpp:17: undefined reference to `FileSystem::AddSearchPath(std::string, int)'
D:/SlickyTest/main.cpp:18: undefined reference to `FileSystem::AddSearchPath(std::string, int)'
D:/SlickyTest/main.cpp:19: undefined reference to `FileSystem::GetSearchPath()'
D:/SlickyTest/main.cpp:20: undefined reference to `FileSystem::Exists(std::string)'
D:/SlickyTest/main.cpp:21: undefined reference to `FileSystem::OpenReadTextFile(std::string)'
D:/SlickyTest/main.cpp:23: undefined reference to `FileSystem::DeInit()'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 10 seconds)
10 errors, 0 warnings


Pecan

..\SlickyEngine\lib\Debug\libSlickyEngine_d.a ..\SlickyEngine\lib\Debug\libSlickyEngine_d.a

looks to me like you included the import lib twice. What about the .def?

fusion

Yep I linked to it twice, but this was not the problem.

EXPORTS
    asCreateScriptEngine @1
    asGetActiveContext @2
    asGetLibraryOptions @3
    asGetLibraryVersion @4
    asThreadCleanup @5

Thats all whats in the def file. There should be alot more.

fusion

Hmm strange...

   // Create the script engine
   mEngine = asCreateScriptEngine(ANGELSCRIPT_VERSION);
   if( mEngine == 0 )
   {
      std::cout << "Failed to create script engine." << std::endl;
      return -1;
   }

When I comment out this code everything works and links fine. My def file has alot more entries then.
I never had such a problem before.

stahta01

Quote from: fusion on December 22, 2006, 07:50:11 PM
Hmm strange...

   // Create the script engine
   mEngine = asCreateScriptEngine(ANGELSCRIPT_VERSION);
   if( mEngine == 0 )
   {
      std::cout << "Failed to create script engine." << std::endl;
      return -1;
   }

When I comment out this code everything works and links fine. My def file has alot more entries then.
I never had such a problem before.

I do NOT think ANGELSCRIPT is used in the nightly builds.

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]

fusion

Hmm if I understand you correctly, I can't use Angelscript in my projects with codeblocks?
I'm using angelscript in my own project wich has nothing todo with codeblock ( its just my ide ).

sethjackson

You can use AngelScript with C::B....

fusion

I think i didn't express myself right. stahta01 I'm not trying to compile codeblocks, I'm trying to compile my own project wich uses angelscript. It sounds to me like you are thinking I'm trying to use angelscript to compile codeblocks.