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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:19:31+00:00 2026-05-31T11:19:31+00:00

I’m trying to learn how to use the library vcglib (http://vcg.sourceforge.net/index.php/Main_Page) but I’m having

  • 0

I’m trying to learn how to use the library vcglib (http://vcg.sourceforge.net/index.php/Main_Page) but I’m having the hardest time getting anything to compile. Right now I’m trying to compile trimesh_definition.cpp which is just a basic example that came with vcglib that is supposed to show how to get everything up and running.

Here is the code I’m trying to comiple:

1  #include <vector>
2 
3  #include <vcg/simplex/vertex/base.h>
4  #include <vcg/simplex/vertex/component.h>
5  #include <vcg/simplex/face/base.h>
6  #include <vcg/simplex/face/component.h>
7 
8  #include <vcg/complex/complex.h>
9 
10 class MyEdge;
11 class MyFace;
12 
13 class MyVertex: public vcg::VertexSimp2<MyVertex,MyEdge,MyFace, vcg::vert::Coord3d, vcg::vert::Normal3f>{};
14 class MyFace: public vcg::FaceSimp2<MyVertex,MyEdge,MyFace, vcg::face::VertexRef>{};
15 
16 class MyMesh: public vcg::tri::TriMesh< std::vector<MyVertex>, std::vector<MyFace> > {};
17 
18 int main()
19 {
20    MyMesh m;
21    return 0;
22 }

I’m comipling the code with the following command:

g++ -I ../../../vcglib trimesh_definition.cpp -o trimesh_def

I get the following errors:

trimesh_definition.cpp:13:40: error: expected template-name before ‘<’ token
trimesh_definition.cpp:13:40: error: expected ‘{’ before ‘<’ token
trimesh_definition.cpp:13:40: error: expected unqualified-id before ‘<’ token
trimesh_definition.cpp:14:36: error: expected template-name before ‘<’ token
trimesh_definition.cpp:14:36: error: expected ‘{’ before ‘<’ token
trimesh_definition.cpp:14:36: error: expected unqualified-id before ‘<’ token
In file included from trimesh_definition.cpp:8:0:
/home/martin/Programming/Graphics/libraries/vcglib/vcg/complex/complex.h: In instantiation of ‘vcg::tri::TriMesh<std::vector<MyVertex>, std::vector<MyFace> >’:
trimesh_definition.cpp:16:86:   instantiated from here
(... followed by many more screenfulls of template info)

I don’t really know much about templates so I have no idea what the problem is or how I should go about fixing it. This is code downloaded straight from the vcglib website which I linked to above and I haven’t modified any of it so I’m suprised that it doesn’t compile.

It looks like most of their examples that they give are for windows computers and visual studios. I’m running arch linux and I’m compiling this with g++. Could the problem be a difference between the two compilers?

I’m really lost, any help would be much appreciated.

  • 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-31T11:19:32+00:00Added an answer on May 31, 2026 at 11:19 am

    VertexSimp2 (and 1 and 3 too) is a class used in old versions of vcg. Search your Lib, you won’t find a definition of the class VertexSimp2.

    This is exactly what the compiler says, vcg::VertexSimp2 is expected to be a type, but it isn’t.

    The Tutorial offers you the actual solution:

    class MyUsedTypes: public vcg::UsedTypes< vcg::Use<MyVertex>::AsVertexType>,
                                              vcg::Use<MyFace>::AsFaceType>  
    
    
    class MyVertex : public vcg::Vertex<MyUsedTypes, vcg::vertex::Coord3d, vcg::vertex::Normal3f> {};
    class MyFace : public vcg::Face<MyUsedTypes, vcg::face::VertexRef> {};
    class MyMesh : public vcg::tri::TriMesh< std::vector<MyVertex>, std::vector<MyFace> > {};
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I would like to count the length of a string with PHP. The string
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:

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.