[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Linking problems
From: |
Marcus Westerlund |
Subject: |
Linking problems |
Date: |
Wed, 25 Feb 2004 19:51:46 +0100 (MET) |
Ive got problems when linking a library that run code in the constructor
of global static objects. I only seems to work if I use symbols
from the same file where i declare the static object.
Ive submittet a test. My program outputs:
$ ./test
test2.cpp
2
when it should be:
$ ./test
test2.cpp
3
It works if I dont use a library
$ g++ -o test *.cpp
or
$ g++ -o test *.o
$ g++ --version
g++ (GCC) 3.3.1 (cygming special)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
$ ld --version
GNU ld version 2.14.90 20030901
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
$ ar --version
GNU ar 2.14.90 20030901
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
f:{*20{:[99>+/a*a:1_ x;b+(*x),(-/a*a),2**/a;x]}/b:.05,y,x}
;;"Fractal in K by Marcus W";;`0:" #"@_{f[x]'r}'r:2-.1*!41
link_error.zip
Description: Zip archive
- Linking problems,
Marcus Westerlund <=