C++ Game Error.

  • (7 Pages)
  • +
  • « First
  • 5
  • 6
  • 7

100 Replies - 3805 Views - Last Post: Yesterday, 10:56 PM Rate Topic: -----

#91 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 1377
  • View blog
  • Posts: 4,318
  • Joined: 20-March 10

Re: C++ Game Error.

Posted 07 November 2017 - 03:03 PM

Well Xrey274,

There is no easy answer to that its really down to you and a question of better code organisation and style...

You need to read up on several things ....

Better computer program design principles

https://en.wikibooks...ming_Principles

and

an Introduction to computer game theory..

https://www.jesperju...mputergame.html

will certainly provide you with plenty of food for thought....
Was This Post Helpful? 1
  • +
  • -

#92 ndc85430  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 590
  • View blog
  • Posts: 2,487
  • Joined: 13-June 14

Re: C++ Game Error.

Posted 07 November 2017 - 11:59 PM

Your first priority, though, really should be to go and learn the language properly.
Was This Post Helpful? 0
  • +
  • -

#93 Xrey274  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 136
  • Joined: 10-December 16

Re: C++ Game Error.

Posted 11 November 2017 - 04:15 PM

What do i need to learn specifically? What exact thing from the language do i need to learn, because i don't seem to know what i don't know. :unsure:/>

This post has been edited by Xrey274: 11 November 2017 - 04:19 PM

Was This Post Helpful? 0
  • +
  • -

#94 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 5898
  • View blog
  • Posts: 20,136
  • Joined: 05-May 12

Re: C++ Game Error.

Posted 11 November 2017 - 04:57 PM

There are two things you are missing to get to the point to be programming a game:

The first thing you are missing are the fundamentals of the language like syntax, declaring and calling functions, how to read error messages, user defined types, etc.

The second thing you are much missing is "how to think in C++". That mindset is a middle ground of the purely Object Oriented Programming point of view of Java programmers, and the eye for efficiency and procedural approaches of C programmers.
Was This Post Helpful? 1
  • +
  • -

#95 ndc85430  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 590
  • View blog
  • Posts: 2,487
  • Joined: 13-June 14

Re: C++ Game Error.

Posted 12 November 2017 - 01:22 AM

I'm also curious as to how you've been learning C++, since any structured way of learning should have covered the things Skydiver mentioned. What kinds of materials are you using?

This post has been edited by ndc85430: 12 November 2017 - 01:37 AM

Was This Post Helpful? 0
  • +
  • -

#96 Xrey274  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 136
  • Joined: 10-December 16

Re: C++ Game Error.

Posted Yesterday, 05:24 PM

I haven't changed the code at all, but i am getting 3 errors:

1.cannot find -lSDLmain
2.cannot find -lSDL
3.l returned l exit status.
Was This Post Helpful? 0
  • +
  • -

#97 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 5898
  • View blog
  • Posts: 20,136
  • Joined: 05-May 12

Re: C++ Game Error.

Posted Yesterday, 05:46 PM

You may not have changed the program, but did you change the environment? Did you uninstall SDL? Did you change any environment variables? Did you move the location of your headers and libraries?

If you are not using a build script, makefile, or a project file, are you sure you are building exactly the same way as before?
Was This Post Helpful? 0
  • +
  • -

#98 Xrey274  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 136
  • Joined: 10-December 16

Re: C++ Game Error.

Posted Yesterday, 05:47 PM

No i haven't. Unless i did something without realizing and remembering.
Was This Post Helpful? 0
  • +
  • -

#99 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 5898
  • View blog
  • Posts: 20,136
  • Joined: 05-May 12

Re: C++ Game Error.

Posted Yesterday, 06:25 PM

The errors indicate that the linker cannot find the SDL related libraries. Something must have changed if the linker used to succeed, but now fails.
Was This Post Helpful? 0
  • +
  • -

#100 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 1377
  • View blog
  • Posts: 4,318
  • Joined: 20-March 10

Re: C++ Game Error.

Posted Yesterday, 09:38 PM

You might have changed from debug to release or vice versa

try changing whatever mode you are in to the opposite one.
Was This Post Helpful? 0
  • +
  • -

#101 ndc85430  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 590
  • View blog
  • Posts: 2,487
  • Joined: 13-June 14

Re: C++ Game Error.

Posted Yesterday, 10:56 PM

So, you're going to ignore the advice about learning the language and forge ahead? Good luck, I guess.
Was This Post Helpful? 0
  • +
  • -

  • (7 Pages)
  • +
  • « First
  • 5
  • 6
  • 7