Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
FigBug
Apr 27, 2002

Lemon Party - Lest we Forget

Ari posted:

This happens whenever I need to reference a function from math.h or stdlib.h - I just gave an example here from math.h. The stdio functions work fine though.

Add -lmath

Adbot
ADBOT LOVES YOU

FigBug
Apr 27, 2002

Lemon Party - Lest we Forget

Mister Biff posted:

Really stupid question about Visual Studio 2008:

Download dependency walker (http://www.dependencywalker.com/) on your test machine and load the .exe and see whats missing.

It's most likely something in the c runtime.

Go into project settings, C/C++, code generation and switch it the runtime from Multi-Threaded DLL to Multi-Threaded.

FigBug
Apr 27, 2002

Lemon Party - Lest we Forget
Are there any free or cheap profilers for windows?

FigBug
Apr 27, 2002

Lemon Party - Lest we Forget

Sarah Sherman posted:

bookProg6.cpp: In function ‘int main()’:
bookProg6.cpp:8: error: expected primary-expression before ‘int’
bookProg6.cpp:8: error: expected `;' before ‘int’
bookProg6.cpp:31: error: expected primary-expression before ‘union’
bookProg6.cpp:31: error: expected `;' before ‘union’

union is a keyword, you can't use it for a variable name.
you are missing a semicolon on line 28

FigBug
Apr 27, 2002

Lemon Party - Lest we Forget

Ugg boots posted:

code:
Flushing  an  input  stream  discards any buffered input and
adjusts the file pointer such that the next input  operation
accesses  the  byte  after  the  last one read.

fflush(stdin) is undefined behavior in ANSI C. Some compilers implement it, some don't.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply