Math Library Errors while building using Cygwin/GCC (Very Tough)
#1
Posted 09 June 2006 - 03:54 PM
Its an SML library used for advanced math.
I have Cygwin installed so that we can use a GNU compiler. Eventually We will be using C++/OpenGL/SML to do some work and the library is a necessity. I have spoken two 3 people, two who were experienced in with this sort of thing and one tech rep from SML but none have even dented the problem yet.
The situation is this. I have a folder that holds all the files for the library. I have 4 folders and a makefile within the first folder. The makefile is tiny and just calls other makefiles. Two of the folders I am not aware if they do anything. The important two folders are NLib and NMTLib. So far when I told the main makefile to do everything it declared it was working on NLib and running a makefile within that folder (within are a few folders and files for building the library. the fodlers are full of .o .h and .c) this make works without complications and the main makefile continues to change directories and move to NMTLib and begins to work. after about 10 or so minutes it fails declaring Error 2. There is output generated to a txt file that says what happened:
Making libnmtlib.so
g++ -shared -m32 -g -o libnmtlib.so objects/IwAObject.o ... objects/my_nurbs_srf.o -L.:NLib -lnlib (I cut out the other .o's as there are MANY) (Also the addition of :NLib to -L. was added while trying to fix the issue, it came as -L)
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lnlib
collect2: ld returned 1 exit status
make[1]: *** [libnmtlib.so] Error 1
make[1]: Leaving directory `/cygdrive/c/Documents and Settings/Julio Gonzales/Desktop/SML resources/SMLib/NMTLib
This error occurs no matter what we have tried. The only thing altering the problem is if we remove -lnlib all together in which I get hundreds of undefined errors instead.
Anyone up to attempting to help with this daunting task please please PLEASE help. you can respond here or contact me at RySinfar on AIM, ryox_sinfar@msn.com on MSN, or RSinfar for yahoo. (AIM or MSN prefered). ICQ is now also an option 233704007
I will be sitting here for hours at work trying to solve the problem so feel free to contact me.
#2
Posted 09 June 2006 - 04:02 PM
#3
Posted 09 June 2006 - 04:11 PM
OBJDIR = objects
INCDIR = inc
TARGET = libnmtlib.so
# The list of source files, directly from the file system.
SRCS = $(wildcard $(SRCDIR)/*.cpp)
# The list of object and dependecy files, derived from the source list
# by substituting .o or .d for .cpp
OBJS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SRCS))
DEPS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.d,$(SRCS))
# for debug add -g and -D_DEBUG
# for 32bit version use -m32
#removed -DIW_NO_IOS_NOCREATE
CXX = g++
CFLAGS = -I$(INCDIR) -I../NLib/inc -D_DEBUG -DIW_NO_IOS_NOCREATE -DUSE_NEW_IOSTREAMS -DIW_NO_IOS_BINARY -DIW_NOT_BUILDING_MS_DLL -DIW_NOT_USING_OPENGL -DGW_NOT_BUILDING_MS_DLL -g -m32 -o2 -ansi -fPIC -Wall
LIBS = -L.-lnlib
thats the makefile up to where the problem starts, we are currently trying to add to -L to give it an absolute path.
Where should I move it around to?
#4
Posted 09 June 2006 - 04:12 PM
#5
Posted 09 June 2006 - 04:29 PM
#6
Posted 09 June 2006 - 04:37 PM
#7
Posted 09 June 2006 - 04:39 PM
Also, I assume you've verified that libnlib.a (or libnlib.so) is being generated in the location you think it is?
#8
Posted 09 June 2006 - 04:41 PM
Yes there is a space, I accidently removed it in the post only. I had to take out something else I had tried (-L.:NLib and also with the absolute directory)
#9
Posted 09 June 2006 - 04:55 PM
Also, a side note, but I noticed you are using -o libnmtlib.so. You should know that gcc under Cygwin produces standard Windows .dll files, not Linux shared objects (and you wouldn't be able to execute those under Windows even if it did).
#10
Posted 09 June 2006 - 05:03 PM
Yes i know what I am doing is beyond me but sadly I have no choice
#11
Posted 09 June 2006 - 05:15 PM
#12
Posted 09 June 2006 - 05:29 PM
I put the lnlib.so in the /lib folder and I am trying that
#13
Posted 09 June 2006 - 05:38 PM
#14
Posted 09 June 2006 - 05:51 PM
#15
Posted 09 June 2006 - 05:52 PM
(thanks for the help so far!)
#16
Posted 09 June 2006 - 07:14 PM
Workign on trying that other fix now
Edit:
ALSO, when I run the makefile for NMTLib part of the instructions are to back up a folder, enter NLib, then to copy libnlib.so to NMTLib from there. But I am still going to try the .dll
#17
Posted 09 June 2006 - 08:08 PM
#18
Posted 09 June 2006 - 08:40 PM
Sadly no I don't have a unix system laying around >.<
#19
Posted 14 June 2006 - 03:21 PM
Thanks to all that took any time for the problem.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












