Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4117818
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:52:55+00:00 2026-05-20T22:52:55+00:00

my make file: all: hPif clean hPif : src/main.o src/fann_utils.o src/hashes.o src/Config.o g++ src/Config.o

  • 0

my make file:

all: hPif clean

hPif : src/main.o src/fann_utils.o src/hashes.o src/Config.o
    g++ src/Config.o src/main.o src/fann_utils.o src/hashes.o  -lfann -L/usr/local/lib -o hPif

Config.o : src/Config.cpp src/Config.h
    g++ -c src/Config.cpp

hashes.o : src/hashes.cpp src/hashes.h
    g++ -c src/hashes.cpp

fann_utils.o: src/fann_utils.cpp fann_utils.h src/Config.h src/hashes.h
    g++ -c src/fann_utils.cpp 

main.o: src/main.cpp src/Config.h src/main.h src/hashes.h
    g++ -c src/main.cpp

clean: 
    rm -rf src/*o
    rm -rf *o

the error I get, upon make:

g++ src/Config.o src/main.o src/fann_utils.o src/hashes.o  -lfann -L/usr/local/lib -o hPif
Undefined symbols:
  "Config::NO_FILE_TRAIN", referenced from:
      _main in main.o
      _main in main.o
  "Config::LEARNING_RATE", referenced from:
      display_help()     in main.o
      train_network_no_file()     in main.o
      train_network()     in main.o
      _main in main.o
.
.
.

detail on code layout here: C++: I have this config class that I want to use between all my CPP files, how do I initialize it?

EDIT:

the code having issues here: http://pastebin.com/PDmHaDaC

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:52:55+00:00Added an answer on May 20, 2026 at 10:52 pm

    I refer you to the accepted answer in the other question where the static variables are properly defined:

    Source (Config.cpp):

    #include "Config.h"
    
    int Config::OUTPUT_TO_FILE = 0;
    int Config::NEED_TO_TRAIN = 0;
    int Config::NO_FILE_TRAIN = 0;
    int Config::NEED_TO_TEST = 0;
    

    Note the Config:: qualification to the variables.

    Compare this to your paste bin page: http://pastebin.com/PDmHaDaC

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a make file which will compile all the .cpp files
I have a make file that contains this code: all: main.o Etudiant.o gcc -lobjc
I wrote a makefile: all: server client server: server.o des.o sha1.o /usr/local/arm-2009q1/bin/arm-none-linux-gnueabi-gcc -o server
I want to make my htaccess file redirect all traffic except that to /images,
I have the following macros in my make file: pdf: // do something clean:
I created the make file obj-m += hello.o all: make -C /home/developer/Desktop/xukr-20120201-omap3/linux-2.6.37-tn M=/home/developer/Desktop/module_test modules
consider the below make file all: @for x in y z; \ do \
I've got a make file that generates multiple targets. Something like: target-a: target-a.src target-include.src
When I edit one source file, does running make recompile that file plus all
Can someone help me figure out the following make file? BINS=file1 file2 file3 all:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.