LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-20-2007, 03:20 PM   #1
KrayZier
LQ Newbie
 
Registered: Jan 2007
Location: In your closet.
Distribution: Ubuntu Linux (6.10 Edgy Eft)
Posts: 3

Rep: Reputation: 0
Cross-Compiling DLLs with Mingw32- Linking a Static Library


Ok. I'm trying to cross-compile thesource code of a "module" for a game's proxy called Furnarchy2 in mingw-g++.

Each one of these modules are .dll files that must be linked to a furn.h header, and (the problematic) furn2.lib file. I've compiled simple .dlls using a couple example sources, but I cannot figure out how to link this Static Library to the DLL. Whenever I try to compile, I got:
Code:
collect2: ld returned 1 exit status
I've compiled these modules in Dev-C++ in Windoze and since that uses Mingw, I tried looking at it's compiler output. I only looked at the lines concerning g++, and skipped the make options (Maybe that was my mistake?). Anyways here's what I copied:
Code:
g++.exe -D__DEBUG__ -c entry.cpp -o entry.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"    -pg -g3
dllwrap.exe --output-def libTemplate.def --driver-name c++ --implib libTemplate.a entry.o  -L"C:/Dev-Cpp/lib" -lgmon "../../../../../../Program Files/Furnarchy2/furn2.lib"  -g3  -o Template.dll
I tried passing this stripped down version to my compiler, and I'm getting this:
Code:
$ i586-mingw32msvc-g++ -D_DEBUG__ -c entry.cpp furn2.h -pg -g3
$ i586-mingw32msvc-dllwrap --output-def libEntry.def --driver-name c++ --implib libEntry.a entry.o -L. -lgmon furn2.lib  -g3  -o Entry.dll
Can anyone help me? I've uploaded the folder containing the files here, with a small README file containing the "instructions" from the program's maker.
 
Old 01-24-2007, 05:52 PM   #2
KrayZier
LQ Newbie
 
Registered: Jan 2007
Location: In your closet.
Distribution: Ubuntu Linux (6.10 Edgy Eft)
Posts: 3

Original Poster
Rep: Reputation: 0
If the question was too vague, just say so?
 
  


Reply

Tags
dll, g++, library, mingw, static, windoze


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross-Compiling with glibc trek413 Linux - Software 0 08-24-2006 09:34 PM
Cross Compiling dosnlinux Programming 5 03-01-2006 11:12 AM
cross compiling cerin Linux - Software 1 02-11-2006 10:47 PM
cross-compiling? jon_k Programming 3 12-09-2004 09:36 AM
cross compiling with g++ hornofsalvation Linux - Newbie 2 10-09-2004 10:29 PM


All times are GMT -5. The time now is 11:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration