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

  • Home
  • SEARCH
  • 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 5850315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T13:07:24+00:00 2026-05-22T13:07:24+00:00

I’m trying to port a program/game that was developed in linux/g++ so that it

  • 0

I’m trying to port a program/game that was developed in linux/g++ so that it runs on windows 7 VS 2008 C++. The program uses libraries such as OpenGL, SDL, and Boost.

I’ve solved a lot of errors but I’m kind of stuck on this one.

I get error code C2059 and C2238. The actual error messages are:

------ Build started: Project: Asteroid Blaster, Configuration: Release Win32 ------
Compiling...
WeaponDisplay.cpp
Weapon.cpp
ViewFrustum.cpp
Vector3D.cpp
UDP_Server.cpp
d:\College\AsteroidBlaster\Utility/ViewFrustum.h(40) : error C2059: syntax error : ';'
d:\College\AsteroidBlaster\Utility/ViewFrustum.h(40) : error C2238: unexpected token(s) preceding ';'
d:\College\AsteroidBlaster\Utility/ViewFrustum.h(41) : error C2059: syntax error : ';'
d:\College\AsteroidBlaster\Utility/ViewFrustum.h(41) : error C2238: unexpected token(s) preceding ';'
UDP_Client.cpp
d:\College\AsteroidBlaster\Utility/ViewFrustum.h(40) : error C2059: syntax error : ';'
d:\College\AsteroidBlaster\Utility/ViewFrustum.h(40) : error C2238: unexpected token(s) preceding ';'
d:\College\AsteroidBlaster\Utility/ViewFrustum.h(41) : error C2059: syntax error : ';'
d:\College\AsteroidBlaster\Utility/ViewFrustum.h(41) : error C2238: unexpected token(s) preceding ';'
TractorBeamShot.cpp

The ViewFrustum.h file is as follows:

  /**
   * viewFrustum: It's got useful functions to cull items that aren't in your view frustum
   * 
   * 2-7-11
   * CPE ---
   */

  #ifndef __VIEW_FRUSTUM_H__
  #define __VIEW_FRUSTUM_H__

  #include "Items/Object3D.h"
  #include "Utility/Plane.h"
  #include "Utility/Matrix4.h"
  #include <vector>
  #include <set>

  class ViewFrustum {
     public:

        ViewFrustum();
        virtual ~ViewFrustum();

        /* Takes in a list of all the Object 3D's around, and culls them down to only the ones
         * that are inside the view frustum.
         */
        virtual std::list<Drawable*>* cullToViewFrustum(std::vector<Drawable*>* all, bool skipParticles);
        virtual std::list<Object3D*>* cullToViewFrustum(std::vector<Object3D*>* all);

        /* Prints out details about all of the planes of the view frustum.
         */
        virtual void print();

     private:
        Matrix4 projMatrix;
        Matrix4 modelViewMatrix;
        Plane* top;
        Plane* bottom;
        Plane* left;
        Plane* right;
        Plane* near;
        Plane* far;

        /** 
         * A modified version of chedDrawableOutside, used by the AI. This stops the
         * AI from targeting Drawable objects which are slightly outside the field
         * of view, which still need to be drawn.
         */
        bool checkTargetableOutside(Drawable* obj);

        /* Returns true if the Drawable object is completely outside of the 
         * view frustum planes.
         * Returns false if it's even part-way inside.
         */
        virtual bool checkDrawableOutside(Drawable* obj);
  };

  #endif 

The offending lines (40-41) are:

  Plane* near;
  Plane* far;

It’s kind of confusing because the ViewFrustum obj got compiled already but when it gets to UDP_Server.cpp and UDP_Client.cpp, it throws an error. I’m not sure if it matters but the UDP classes use Boost’s aiso and serialization modules. I know Boost sometimes gives out weird warnings but I’m not sure if Boost has to do anything with this error.

If anyone has any idea why this is or if you need more code posted, please let me know.

  • 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-22T13:07:25+00:00Added an answer on May 22, 2026 at 1:07 pm

    Chances are you’re including a windows header before that one, and near and far are defined somehwere in there. Those are (legacy) things from the 16bit era.

    See this related question Is there a clean way to prevent windows.h from creating a near & far macro? for workarounds.

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

Sidebar

Related Questions

No related questions found

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.