D
David Plans Casal
hello people!
just trying to use extconf.rb script using mkmf to compile a bundle for
osx (some c++ libraries)
compilation is going ok and linking (even libstdc++) seems ok, but
invoking the shared bundle in IRB gives me:
dyld: ruby Undefined symbols:
<snip>
(long list of symbols)
could someone point at the most common reason this happens?
sorry for such n00b question, but just can't figure it out, tried
several different LDFLAGS options after googling, and currently have
the following options set:
if RUBY_PLATFORM =~ /darwin/
$CPPFLAGS += " -DUNIX"
$LDFLAGS += " -lstdc++ -L/usr/local/lib"
dir_config("fmod","/usr/local/include","/usr/local/lib")
end
if have_header("fmod.h")
if RUBY_PLATFORM =~ /darwin/
CONFIG["CC"] = "c++"
CONFIG["LDSHARED"].gsub!("cc","g++") #make sure you're using
g++ so it links libstdc++
CONFIG['LDSHARED'].gsub!('gcc','g++')
$create = true if have_library("fmod")
elsif have_library("fmod") #more than likely a linux box
CONFIG['LDSHARED'].gsub!('gcc','g++') #make sure c++ gets
linked properly
$create = true
end
end
any advice?
thanks!
david casal
just trying to use extconf.rb script using mkmf to compile a bundle for
osx (some c++ libraries)
compilation is going ok and linking (even libstdc++) seems ok, but
invoking the shared bundle in IRB gives me:
dyld: ruby Undefined symbols:
<snip>
(long list of symbols)
could someone point at the most common reason this happens?
sorry for such n00b question, but just can't figure it out, tried
several different LDFLAGS options after googling, and currently have
the following options set:
if RUBY_PLATFORM =~ /darwin/
$CPPFLAGS += " -DUNIX"
$LDFLAGS += " -lstdc++ -L/usr/local/lib"
dir_config("fmod","/usr/local/include","/usr/local/lib")
end
if have_header("fmod.h")
if RUBY_PLATFORM =~ /darwin/
CONFIG["CC"] = "c++"
CONFIG["LDSHARED"].gsub!("cc","g++") #make sure you're using
g++ so it links libstdc++
CONFIG['LDSHARED'].gsub!('gcc','g++')
$create = true if have_library("fmod")
elsif have_library("fmod") #more than likely a linux box
CONFIG['LDSHARED'].gsub!('gcc','g++') #make sure c++ gets
linked properly
$create = true
end
end
any advice?
thanks!
david casal