Hi,

I am trying build a xpcom sample from http://www.iosart.com/firefox/ xpcom/ on Mac OS X, and my makefile is as bellow:

################################## Makefile ##################################
CXX   = g++
CPPFLAGS +=     -fno-rtti              \
                -fno-exceptions
#               -shared

# Change this to point at your Gecko SDK directory.
GECKO_SDK_PATH = /Users/dkr/Develop/mozilla/mozilla/dist/sdk

# GCC only define which allows us to not have to #include mozilla-config
# in every .cpp file.  If your not using GCC remove this line and add
# #include "mozilla-config.h" to each of your .cpp files.
GECKO_CONFIG_INCLUDE = -include mozilla-config.h

GECKO_DEFINES  = -DXPCOM_GLUE

GECKO_INCLUDES = -I $(GECKO_SDK_PATH)/include

GECKO_LDFLAGS =  -L$(GECKO_SDK_PATH)/lib -lxpcomglue \
                 -lnspr4      \
                 -lplds4

FILES = MyComponent.cpp MyComponentModule.cpp

TARGET = MyComponent.dylib

build:
$(CXX) -Wall -Os -o $(TARGET) $(GECKO_CONFIG_INCLUDE) $ (GECKO_DEFINES) $(GECKO_INCLUDES) $(GECKO_LDFLAGS) $(CPPFLAGS) $ (CXXFLAGS) $(FILES)
        chmod +x $(TARGET)
        strip $(TARGET)

clean:
        rm $(TARGET)

#################################### End ####################################

But I got a fail message as :
ld: Undefined symbols:
_main
__Z20NS_NewGenericModule2P12nsModuleInfoPP9nsIModule
make: *** [build] Error 1

Could anyone help me? Thanks very much.
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to