Jump to content
  • Advertisement

grady

Member
  • Content Count

    104
  • Joined

  • Last visited

Community Reputation

122 Neutral

About grady

  • Rank
    Member
  1. grady

    Strange GCC Issue

    I'm not an expert, but this is what I do to automatically create a makefile for my small projects. The file below would be called game.mk. The line in the 'makefile' target that calls the compiler with the -M option does all of the magic. 'gcc -M source.cpp' will barf a makefile-syntax-friendly list of header files that source.cpp depends on. I found this out from O'Reilly's "Managing Projects with Make" book. #to recreate the makefile type 'make -f game.mk makefile AUTO=headers' INCLUDE=-I /usr/incl (truncated) SOURCES=$(OBJS:.o=.cpp) terrain.cpp game : $(OBJS) $(CXX) $(OBJS) $(INCLUDE) $(LIBS) -pg -o $@ terrain : $(TERRAINOBJS) $(CXX) $(TERRAINOBJS) $(INCLUDE) $(LIBS) -pg -o $@ clean: rm core* *.o game makefile : $(AUTO) cp game.mk $@ $(CXX) $(INCLUDE) -M $(SOURCES) >> $@ headers:
  2. Here is a how-to on loading functions and classes from shared objects at runtime. http://www.tldp.org/HOWTO/C++-dlopen/
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!