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 7791779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:59:40+00:00 2026-06-01T21:59:40+00:00

The full error is 1>d:\test\src\search.cpp(130): error C2371: ‘Pos’ : redefinition; different basic types 1>

  • 0

The full error is

1>d:\test\src\search.cpp(130): error C2371: 'Pos' : redefinition; different basic types
1>    d:\test\src\search.cpp(100) : see declaration of 'Pos'
  • search.cpp, line 130: Moves(*Pos); (If I omit this line, the code compiles without error.)
  • search.cpp, line 100: Position *Pos = Mov.ChildPosition;

The Moves constructor is declared: Moves(Position &Pos);

Mov is a function argument: void searchMove(Move &Mov)

Why does MSVC say I’m redefining Pos?

Update 1: As requested:

  • main.cpp, line 32: Position Pos(TESTF, TESTW, TESTB);
  • main.cpp, line 36: searchRoot(Pos, 5);
  • moves.cpp, line 467: Position *NextPosition = new Position(ParentPosition->flags^0x8000, white, black, theirs, ours);
  • moves.cpp, line 474: Move *Mov = new Move(*NextPosition, piece, square1, square2, capture);
  • search.cpp, line 26: void searchRoot(Position &Pos, U8 depth)
  • search.cpp, line 32: Moves Mov(Pos);

Position objects are passed to the constructors of Move and Moves objects, stored in ChildPosition and ParentPosition respectively.

Update 2: I replaced line 130 with David Norman’s suggestion below, and now I’m receiving five “LNK2001: unresolved external symbol” errors. This is strange because they all refer to variables declared using extern in my search.h file.

Update 3: I replaced extern with static and everything now compiles. I don’t understand why I was getting the errors I was. Can anyone explain this to me?

  • 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-06-01T21:59:43+00:00Added an answer on June 1, 2026 at 9:59 pm

    If your intention is to create a Moves object on line 130, then try giving it a name:

    Moves dummyMoves(*Pos);
    

    Otherwise you are probably declaring a variable named Pos of type Moves *

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

Sidebar

Related Questions

The full error I'm getting is this: error: ambiguous overload for ‘operator[]’ in ‘a[boost::_bi::storage4<A1,
See the full error here: http://notesapp.heroku.com/ I'm using DataMapper and dm-validations 0.10.2. No matter
Seems like cuke doesn't show the full error message (at least when problem occurs
I'm attempting to print a bitmap from an Espon receipt printer. The full error
you can view full source code here dpaste.com/hold/167199 Error: delete() takes exactly 2 arguments
I am trying to create full text index but I am getting error which
How do I sort out (distinguish) an error derived from a disk full condition
Can anyone help me with this error? alt text http://abbeylegal.com/downloads/parsererror.jpg full image here It
I am debugging my website. When it has an error, the full text form
I get a java.lang.NoClassDefFoundError: android/util/Log error when I try to run my unit test

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.