Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Page Tree
root@self
startDepth1

This section contains a list of code examples that can perform various simple tasks. In general, to compile the code it is only necessary to add a few files to your project:

...

  • include GangProARM-Dll.h

  • on Windows link with GangProARM-FPAsel.lib or dynamically load GangProARM-FPAsel.dll

  • on Linux use this Makefile to compile any .cpp file.

    Code Block
    languagepowershell
    #"sudo dpkg -i  <deb file from linux package>" to install multigparm
    CC := g++
    LIBS_GP := -lmultigparm -lpthread -ldl -lusb-1.0 -ludev
    
    CPP_FILES := $(wildcard *.cpp)
    EXECS := $(notdir $(CPP_FILES:.cpp=))
    EXECSGP := $(addsuffix gp, $(notdir $(CPP_FILES:.cpp=)))
    
    .PHONY: all clean
    
    all: $(EXECS)
    
    %: %.cpp
    	$(CC) -o $@gp $< -DGANGPROARM -L. $(LIBS_GP)
    
    clean:
    	rm -f $(EXECSGP)
    
    .PHONY: force
    	force :;

...