   problems using gcc and ld
  Ive setup the following scenarioTest - a test program, contains one function that is imported and called by the 'Main' libMain - a static lib which contains the entrypoint for the system ( void main() ), additionally it calls an external function in Test.Core - a shared library containing various functionsi can get it to work under windows (using VC6) by compiling  - Main into a static library(Main.lib) - Core into a DLL and also outputting a lib (Core.dll and Core.lib) - Test by linking Main.lib and Core.lib(Test.exe)next i tryed to replicate the scenario on linux using my limited knowledge of gcc and ld.Here what im currently doing:build Core.lib gcc -c ./Core/*.cpp ar rc ./lib/Core.a ./*.o ld -shared -o ./bin/Core.so ./lib/Core.a /usr/lib/crt1.o /usr/lib/crtn.o /usr/lib/crti.onow Main: gcc -c Main.cpp ar rc ./lib/Main.a Main.onow Test gcc -c Test.cpp ld -o ./bin/Test Test.o ./lib/Core.a ./lib/Main.ahowever, it doesnt work...ive lookup various tutorials through google, but they generally only handled simple cases of linking...could someone please shed some light this for me?[edited by - ZorD_98 on August 3, 2003 2:49:24 AM]
  Always had problems with those shared libs, too... But I always got it working somehow... Tomorrow I''ll try to check how it looked in my projects... ;P darkoneRegistered Linux User #317188 ;  Oh, and it would be useful if you could put whole output from linker/compiler and tell what exactly won''t work  darkoneRegistered Linux User #317188 ;  for the commands that I have used (first post) I get  warning: cannot find entry symbol _start; defaulting to 0000000008048074however, ived tryed many ways to solve this and getting different results such as undefined reference to ''...'' and also no errors, but when i try to execute Test I get a seg fault or Illegal instruction message. ;  very vague idea of what you''re trying to do and how you''re trying to do it here, butwhat about crt0.o ? _start is usually in that. You don''t mention that anywhere.... 